package models

import (
	"time"
	"github.com/astaxie/beego/orm"
)
//用户优惠券获取及兑换


type UserCoupon struct {
	Id                  int64
	CouponId            int `ht:"list;search;name(优惠券编号)"`
	UserId              int `ht:"list;name(得主编号)"`
	CouponGetTime       time.Time `ht:"list;name(优惠券获取时间)"`
	CouponEndTime       time.Time `ht:"list;name(优惠券结束时间)"`
	CouponLeastDiscount float32 `ht:"list;name(满减阈值)"`
	CouponDiscount      float32 `ht:"list;name(满减额度)"`
	CouponMessage       string `ht:"name(优惠券信息)"`
	CouponUser          int `ht:"name(优惠券所属卖家)"`
}

func init() {
	orm.RegisterModel(new(UserCoupon))
}
func (*UserCoupon)TableName() string {
	return "user_coupon"
}

func (*UserCoupon) FN_Id() string {
	return "Id"
}
func (*UserCoupon) FN_CouponId() string {
	return "CouponId"
}
func (*UserCoupon) FN_UserId() string {
	return "UserId"
}
func (*UserCoupon) FN_CouponGetTime() string {
	return "CouponGetTime"
}
func (*UserCoupon) FN_CouponEndTime() string {
	return "CouponEndTime"
}
func (*UserCoupon) FN_CouponLeastDiscount() string {
	return "CouponLeastDiscount"
}
func (*UserCoupon) FN_CouponDiscount() string {
	return "CouponDiscount"
}
func (*UserCoupon) FN_CouponMessage() string {
	return "CouponMessage"
}
func (*UserCoupon) FN_CouponUser() string {
	return "CouponUser"
}